
from django.contrib import admin

from .models import K_VACCINE, S_CERT, S_DOLJ, S_OTD, S_PODR, S_VACCINE, WORKER

# Register your models here.
admin.site.register(S_OTD)
admin.site.register(S_CERT)
admin.site.register(S_VACCINE)
admin.site.register(K_VACCINE)


@admin.register(S_PODR)
class PodrAdmin(admin.ModelAdmin):
    list_display = ("id", "podr_code", "podr_name")
    list_filter = ("podr_code", "podr_name")
    search_fields = ("podr_code", "podr_name")
    list_editable = ("podr_code", "podr_name")
    list_per_page = 20


@admin.register(S_DOLJ)
class DoljAdmin(admin.ModelAdmin):
    list_display = ("id", "dolj_code", "dolj_name")
    list_filter = ("dolj_code", "dolj_name")
    search_fields = ("dolj_code", "dolj_name")
    list_editable = ("dolj_name",)
    list_per_page = 20


@admin.register(WORKER)
class WorkerAdmin(admin.ModelAdmin):
    list_display = ("id_worker", "fam_worker", "im_worker", "ot_worker", "dr", "podr", "otd", "dlj", "cert")
    list_filter = ("podr", "otd", "dlj", "cert")
    search_fields = ("id_worker", "fam_worker", "im_worker", "ot_worker", "dr", "podr", "otd", "dlj", "cert")
    list_editable = ("fam_worker", "im_worker", "ot_worker", "dr", "podr", "otd", "dlj", "cert")
    list_per_page = 20
